home *** CD-ROM | disk | FTP | other *** search
- /******************************************************
- WndExtra Access Functions
-
- Description:
- The following functions access data whose offset
- is specified as a negative index from the end
- of the class's wndExtra data block. This allows
- the same data to be added to multiple subclasses,
- even though their superclasses have variable length
- wndExtra data blocks.
- In each function, the size of the wndExtra data block
- is first retrieved, then the Windows-compatible offset
- is calculated and passed to the corresponding Windows
- function.
-
- Author: Gregory C. Peters
- ******************************************************/
-
- WORD pSetWindowWord(HWND hWnd, int offset, WORD value)
- {
- WORD wndExtra = GetClassWord(hWnd, GCW_CBWNDEXTRA);
- return(SetWindowWord(hWnd, wndExtra + offset, value));
- }
-
- WORD pGetWindowWord(HWND hWnd, int offset)
- {
- WORD wndExtra = GetClassWord(hWnd, GCW_CBWNDEXTRA);
- return(GetWindowWord(hWnd, wndExtra + offset));
- }
-
- LONG pSetWindowLong(HWND hWnd, int offset, DWORD value)
- {
- WORD wndExtra = GetClassWord(hWnd, GCW_CBWNDEXTRA);
- return(SetWindowLong(hWnd, wndExtra + offset, value));
- }
-
- LONG pGetWindowLong(HWND hWnd, int offset)
- {
- WORD wndExtra = GetClassWord(hWnd, GCW_CBWNDEXTRA);
- return(GetWindowLong(hWnd, wndExtra + offset));
- }
-